#!/usr/bin/php -q

<?php
require_once('PhpXpay.class.php');

try {
  $api = new PhpXpay('site12345');
  $api->setDebug(1);
  $api->setAmount(10.5);
  $api->setCurrency('GBP');
  $api->setCardType('Visa');
  $api->setCardNo('4111111111111111');
  $api->setExpiryDate('01/13');
  $api->setSecurityCode('123');
  
  $response = $api->doAuthorize();
  
  print_r($response);
  
} catch (Exception $e) {
  
  echo "Exception: ".$e->getMessage()."\n";
}

?>
